<template>
  <div class="userinfo">
    <!-- 个人信息详情页 -->
    <!-- 书写标题头 -->
    <div class="order_title">
      <span class="one" @click="fanhui">&lt;</span>
      <span>商品订单</span>
      <van-icon name="wap-home-o" @click="shoye" />
    </div>
    <div class="user_info">
      <ul>
        <li>
          <span>姓名</span>
          <span>{{ UserInfoLists.name }}</span>
        </li>
        <li>
          <span>联系电话</span>
          <span>{{ UserInfoLists.phone }}</span>
        </li>
        <li>
          <span>性别</span>
          <span>{{ UserInfoLists.sex }}</span>
        </li>
        <li>
          <span>年薪</span>
          <span>{{ UserInfoLists.year_salary }}</span>
        </li>
        <li>
          <span>月薪</span>
          <span>{{ UserInfoLists.month_salary }}</span>
        </li>
        <li>
          <span>个人简介</span>
          <span>{{ UserInfoLists.remark }}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { GetUserInfoLists } from "@/request/api";
export default {
  data() {
    return {
      UserInfoLists: "",
    };
  },
  created() {
    GetUserInfoLists().then((res) => {
      console.log(res);
      this.UserInfoLists = res.data;
    });
  },
  methods: {
    // 返回上一个页面
    fanhui() {
      this.$router.go(-1);
    },
    // 返回到首页
    shoye() {
      this.$router.push("/home");
    },
  },
};
</script>
 
<style lang = "less" scoped>
/* 个人信息页的总体位置布局 */
.userinfo {
  min-height: 100%;
  width: 100%;
  background-color: #efefef;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  /* 头部样式 */
  .order_title {
    width: 100%;
    height: 0.5rem;
    background-color: #003399;
    color: white;
    padding: 0.2rem 0.2rem 0.1rem;
    box-sizing: border-box;
    font-size: 0.18rem;
    display: flex;
    justify-content: space-between;
  }
  .user_info {
    width: 100%;
    margin-top: 0.1rem;
    ul {
      li {
        height: 0.5rem;
        width: 100%;
        background-color: white;
        line-height: 0.5rem;
        display: flex;
        justify-content: space-between;
        padding: 0 0.2rem;
        box-sizing: border-box;
        border-bottom: 1px solid #eee;
        span {
          &:nth-child(2) {
            color: #aaa;
          }
        }
        &:nth-child(3) {
          margin-top: 0.1rem;
        }
      }
    }
  }
}
</style>